Skip to main content

Checkout Sessions

Checkout Sessions in APIO are designed to work as a payment gateway for external platforms, such as e-commerce websites or custom applications.

They allow you to generate a temporary payment session in APIO based on a cart created outside of APIO.


How Checkout Sessions Work​

  1. The e-commerce platform builds a cart externally with a total amount
  2. The e-commerce creates a Checkout Session in APIO
  3. APIO generates a payment link (URL) for that session
  4. The user is redirected to the APIO-hosted checkout page
  5. The user completes the payment
  6. The user is redirected back to the original e-commerce site

Session Expiration​

  • Each Checkout Session URL is valid for 15 minutes
  • Once expired, the session can no longer be used
  • A new Checkout Session must be created if the user wants to retry the payment

Payment Completion and Redirection​

After the payment flow finishes:

  • The user is redirected back to the original e-commerce URL
  • The redirection happens regardless of the payment result (success or failure)

Payment Status Responsibility​

🚨 Important:
APIO does not notify the e-commerce when a payment is completed.

It is the responsibility of the e-commerce platform to:

  • Query the Checkout Session status via the APIO API
  • Determine whether the payment was successful, failed, or expired
  • Act accordingly (confirm order, retry payment, show error, etc.)

This design ensures:

  • Greater control for the merchant
  • Clear ownership of order state management
  • Simpler integration patterns

Key Characteristics​

  • Designed for external carts and platforms
  • Temporary payment URLs (15-minute validity)
  • Redirect-based flow
  • No automatic notifications from APIO
  • Status must be actively queried by the merchant

Checkout Sessions provide a secure and flexible way to integrate APIO as a payment gateway while keeping full control over the checkout logic in your own platform.